<template>
 <div>

		<!--搜索功能-->
		<Search @search="search" v-model="text" ></Search>



 </div>
</template>

<script>
export default {
 data() {
  return {


	  //检索关键词
	  text:"",

  }
 },
 components: {

 },
watch:{

	$route(to,from){

		//手动刷新
		this.$router.go(0);

	}

},
methods: {
	//检索方法
	search:function(){

		//获取输入的关键词
		console.log(this.text);

		//进行跳转操作 带参数
		this.$router.push({path:'/mysearch',query:{text:this.text}});



	},
},
}
</script>
